<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
      <div class="h">
          <form action="{:U('index')}" method="get" class="fr form-inline">
              <input type="hidden" name="pagesize" value="{$pagesize}" />
              <input type="text" name="keywords" <?php if(!$keywords){ ?>placeholder="输入订单号搜索" <?php } ?> class="form-control" value="{$keywords}" />
              <button type="submit" class="btn btn-default">搜索</button>
          </form>

          <div style="clear:both;"></div>
      </div>

<div class="table_" style=""><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0" style="">
     
     
    
 <thead>
 <tr>
    <td align="center">ID</td>
    <td align="center">订单号</td>
    <td align="center">用户名</td>
   <!-- <td align="center">快递号</td>-->
    <td align="center">备注</td>
    <td align="center">快递公司</td>
    <td align="center">退/换货数量</td>
    <td align="center">退货金额</td>
    <td align="center">退货类型</td>
    <td align="center">状态</td>
    <td align="center">下单日期</td>
    <td align="center">操作</td>
  </tr>
</thead>
    <notempty name="list" >
        <volist name="list" id="vo">
            <tr class="data_list">
                <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.sale_id}" />{$vo.sale_id}</td>
                <td align="center"><a href="{:U('returngoods_mes',array('id'=>$vo['sale_id']))}" target="center">{$vo.ordernumber}</a></td>
                <td align="center">{$vo.yourname}</td>
                <!--<td align="center">{$vo.couriernumber}</td>-->
                <td align="center">{$vo.remark}</td>
                <td align="center">{$vo.courier}</td>
                <td align="center">{$vo.thnum}</td>
                <td align="center">
                    <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
                        ￥{$vo['price']*$vo['thnum']}
                    </if>
                </td>
                <td align="center"><if condition="$vo.thtype eq 1">退货<elseif condition="$vo.thtype eq 2"/>换货<elseif condition="$vo.thtype eq 3"/>退款</if></td>
                <td align="center">

                    <eq name="vo.thtype" value="3">
                        <if condition="$vo.thstatus eq 3">待审核<elseif condition="$vo.thstatus eq 4"/>已完成</if>

                        <else/>
                        <if condition="$vo.thstatus eq 1">待审核<elseif condition="$vo.thstatus eq 2"/>已审核，等待用户提交物流<elseif condition="$vo.thstatus eq 3"/>用户已经提交物流信息，待退货<elseif condition="$vo.thstatus eq 4"/>已完成<elseif condition="$vo.thstatus eq 5"/>管理员已退货，正等待用户收货</if>
                    </eq>

                </td>
                <td align="center">{:date('Y-m-d H:i:s', $vo['create_time'])}</td>
                <td align="center">

                    <a onClick="art.dialog.open('{:U('returngoods_mes',array('id'=>$vo['sale_id'],'product_id'=>$vo['product_id']))}', {width: 800, height: 500,lock:true,title:'售后详情'});" href="##">查看</a>
                    |
                    <if condition="$vo.thstatus eq 1">

                        <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
                            <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">退货审核</a>
                            <elseif condition="$vo.thtype eq 2"/>
                            <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">换货审核</a>
                        </if>


                        <elseif condition="$vo.thstatus eq 3"/>

                        <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
                            <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">确认</a>
                            <elseif condition="$vo.thtype eq 2"/>
                            <a data-toggle="modal" data-target="#myModal1" onClick="document.getElementById('sale_id1').value={$vo.sale_id}" href="##">换货确认</a>
                        </if>
                        |

                    </if>
                    <a data-toggle="modal" data-target="#myModal11" onClick="document.getElementById('sale_id11').value={$vo.sale_id}" href="##">取消</a>

                </td>
            </tr>
        </volist>
        <else />
        <tr><td colspan="11" align="center">暂无数据</td></tr>
    </notempty>


   <tr align="right"><div class="pages">{$pages}</div></tr>

</table></div>

  </div>
  <div class="clear"></div>
</div>
<form action="{:U('upstate')}" method="post">
    <div class="modal fade" id="myModal11" tabindex="-1" role="dialog" aria-labelledby="myModalLabel11">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">取消售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">操作备注</label>
            <br>
            <input type="hidden" value="" id="sale_id11" name="sale_id">
            <input type="hidden" value="0" id="" name="thstatus">
            
            <input type="text" class="form-control" id="remark" name="remark" placeholder="请填写操作备注，以便以后查证">
            
            
            
            
            
            
            
            
            
            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form> 











<form action="{:U('upstate')}" method="post">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">操作备注</label>
            <br>
            <input type="hidden" value="" id="sale_id" name="sale_id">
            
            
            <input type="text" class="form-control" id="remark" name="remark" placeholder="请填写操作备注，以便以后查证">
            
            
            
            
            
            
            
            
            
            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form> 

<form action="{:U('upstate')}" method="post">
    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">快递单号</label>
            <br>
            <input type="hidden" value="" id="sale_id1" name="sale_id">
            
            
            <input class="form-control" datatype="n" value="" name="couriernumber" id="couriernumber" type="text" placeholder="请输入退货快递单号">
            <br>

            <label for="exampleInputName2">快递公司</label>
            <br>
           
            
            
            <input class="form-control" datatype="n" value="" name="courier" id="courier" type="text" placeholder="请填写快递公司"> 

            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form> 

<include file="Public:footer" />